package com.sulong.dao;

import com.sulong.Column;
import com.sulong.Table;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface DaoInterface {
    @Select("SELECT\n" +
            "\n" +
            "TABLE_COMMENT  tableDescribe,\n" +
            "table_name  name\n" +
            "\t\n" +
            "FROM\n" +
            "\tinformation_schema. TABLES\n" +
            "WHERE\n" +
            "\ttable_schema = '${dataBaseName}'\n" +
            "AND table_type = 'base table' ")
    List<Table> getAllTable(@Param("dataBaseName")String dataBaseName);
    @Select("SHOW FULL COLUMNS FROM ${name}")
    List<ColumnPo> getColumnsByTableName(@Param("name") String name);
}
